/*!
\file
	ItemBase.cpp
\brief
	Definition of ItemBase.
\author
	Copyright (C) 2008 Vadym Hulakov, mailto:hulakov@gmail.com.
	All rights reserved.
*/

#include "ItemBase.h"
#include <boost/format.hpp>

namespace ObjectModel
{
	ItemBase::ItemBase(const wchar_t* name, const wchar_t* description/* = 0*/)
	{
		if (description)
		{
			_description = description;
		}
		else
		{
			_description = (boost::wformat(L"TODO: Write '%1%' description") % name).str();
		}

		_name = name;
	}

	ItemBase::ItemBase(const ItemBase& object)
	{
		construct(object);
	}

	ItemBase::~ItemBase()
	{
	}

	void ItemBase::construct(const ItemBase& object)
	{
		_description = object._description;
		_name = object._name;
	}

	ItemBase& ItemBase::operator=(const ItemBase& object)
	{
		construct(object);
		return *this;
	}
}